import request from "@/util/api/request";
import MyProxy from "@/util/api/MyProxy";

let POST = "post"
let GET = "get"

const api = {
  // 用户管理
  dl: { url: "/yhgl/dl", method: POST },
  queryYhList: { url: "/yhgl/queryYhList", method: POST },
  addYh: { url: "/yhgl/addYh", method: POST },
  deleteYh: { url: "/yhgl/deleteYh", method: POST },
  undeleteYh: { url: "/yhgl/undeleteYh", method: POST },
  updateYh: { url: "/yhgl/updateYh", method: POST },
  setPassword: { url: "/yhgl/setPassword", method: POST },

  // 项目管理
  queryXmListByRybm: { url: "/xmgl/queryXmListByRybm", method: POST },
  queryXmByXmbm: { url: "/xmgl/queryXmByXmbm", method: POST },
  addXm: { url: "/xmgl/addXm", method: POST },
  deleteXm: { url: "/xmgl/deleteXm", method: POST },
  undeleteXm: { url: "/xmgl/undeleteXm", method: POST },
  updateXm: { url: "/xmgl/updateXm", method: POST },
  dcGz: { url: "/xmgl/dcGz", method: POST },
  drGz: { url: "/xmgl/drGz", method: POST },
  cdscXm: { url: "/xmgl/cdscXm", method: POST },
  qkxmgz: { url: "/xmgl/qkxmgz", method: POST },

  // 规则分类管理
  queryGzflListByXmbm: { url: "/gzflgl/queryGzflListByXmbm", method: POST },
  addGzfl: { url: "/gzflgl/addGzfl", method: POST },
  updateGzfl: { url: "/gzflgl/updateGzfl", method: POST },
  deleteGzfl: { url: "/gzflgl/deleteGzfl", method: POST },
  queryGzflByGzflbm: { url: "/gzflgl/queryGzflByGzflbm", method: POST },
  // 规则管理-规则定义
  queryGzdyListByGzflbm: { url: "/gzgl/queryGzdyListByGzflbm", method: POST },
  queryGzdyByGzbm: { url: "/gzgl/queryGzdyByGzbm", method: POST },
  setGzdyQyzt: { url: "/gzgl/setGzdyQyzt", method: POST },
  deleteGzdy: { url: "/gzgl/deleteGzdy", method: POST },
  addGzdy: { url: "/gzgl/addGzdy", method: POST },
  updateGzdy: { url: "/gzgl/updateGzdy", method: POST },
  updateGzbds: { url: "/gzgl/updateGzbds", method: POST },

  copyGz: { url: "/gzgl/copyGz", method: POST },
  sortGzdy: { url: "/gzgl/sortGzdy", method: POST },

  testRule: { url: "/gzgl/testRule", method: POST },
  // getGsList: { url: "/gzgl/getGsList", method: POST },

  queryGzinfoListByGjz: { url: "/gzgl/queryGzinfoListByGjz", method: POST },
  // 规则管理-表达式
  queryBdsListByGzbm: { url: "/gzgl/queryBdsListByGzbm", method: POST },
  addBds: { url: "/gzgl/addBds", method: POST },
  deleteBds: { url: "/gzgl/deleteBds", method: POST },
  updateBds: { url: "/gzgl/updateBds", method: POST },
  queryBdsByBdsbm: { url: "/gzgl/queryBdsByBdsbm", method: POST },
  // 实体管理-实体定义
  queryStdyListByXmbm: { url: "/stgl/queryStdyListByXmbm", method: POST },
  addStdy: { url: "/stgl/addStdy", method: POST },
  updateStdy: { url: "/stgl/updateStdy", method: POST },
  deleteStdy: { url: "/stgl/deleteStdy", method: POST },
  queryStTree: { url: "/stgl/queryStTree", method: POST },
  // 实体管理-实体结构
  queryStjgListByStbm: { url: "/stgl/queryStjgListByStbm", method: POST },
  addStjg: { url: "/stgl/addStjg", method: POST },
  updateStjg: { url: "/stgl/updateStjg", method: POST },
  deleteStjg: { url: "/stgl/deleteStjg", method: POST },
  // 数据源管理
  querySjyList: { url: "/sjygl/querySjyList", method: POST },
  queryCanUseSjy: { url: "/sjygl/queryCanUseSjy", method: POST },
  addSjy: { url: "/sjygl/addSjy", method: POST },
  updateSjy: { url: "/sjygl/updateSjy", method: POST },
  deleteSjy: { url: "/sjygl/deleteSjy", method: POST },
  undeleteSjy: { url: "/sjygl/undeleteSjy", method: POST },
  getSjysj: { url: "/sjygl/getSjysj", method: POST },
  // 系统管理
  getXtInfo: { url: "/xtgl/getXtInfo", method: POST },
  // 文档
  indexMd: { url: "/doc/{fileName}", method: GET },
  // 数据库
  queryData: { url: "/sjk/queryData", method: POST },

  // 实体关系管理
  queryStgxListByXmbm: { url: "/stgxgl/queryStgxListByXmbm", method: POST },
  addStgx: { url: "/stgxgl/addStgx", method: POST },
  deleteStgx: { url: "/stgxgl/deleteStgx", method: POST },

  // 模型实体关系管理
  queryMxstgxListByXmbm: { url: "/mxstgxgl/queryMxstgxListByXmbm", method: POST },
  addMxstgx: { url: "/mxstgxgl/addMxstgx", method: POST },
  deleteMxstgx: { url: "/mxstgxgl/deleteMxstgx", method: POST },
  updateMxstgx: { url: "/mxstgxgl/updateMxstgx", method: POST },

  // 外部方法管理
  queryFnList: { url: "/wbffgl/queryFnList", method: POST },
  uploadFn: { url: "/wbffgl/uploadFn", method: POST },

  // 文件服务
  download: { url: "/fs/download", method: GET },
  // 方法管理
  getFnList: { url: "/ffgl/getFnList", method: POST },
}

export default function (Vue, options) {
  request.setBaseUrl(options.baseUrl)
  Vue.prototype.$api = new MyProxy(api)
}
